package com.example.chamberlainserver.Service;

import com.example.chamberlainserver.Entry.AdjustmentLog;
import com.example.chamberlainserver.dto.PageResult;

import java.util.List;
import java.util.Map;

/**
 * 调整日志服务接口
 */
public interface AdjustmentLogService {
    /**
     * 添加调整日志
     */
    boolean addAdjustmentLog(AdjustmentLog adjustmentLog);
    
    /**
     * 根据ID查询调整日志
     */
    AdjustmentLog getAdjustmentLogById(String id);
    
    /**
     * 根据排班分配ID查询调整日志
     */
    List<AdjustmentLog> getAdjustmentLogsByAssignmentId(String assignmentId);
    
    /**
     * 根据调整类型查询调整日志
     */
    List<AdjustmentLog> getAdjustmentLogsByType(String adjustmentType);
    
    /**
     * 根据调整人查询调整日志
     */
    List<AdjustmentLog> getAdjustmentLogsByAdjustedBy(Integer adjustedBy);
    
    /**
     * 查询所有调整日志
     */
    List<AdjustmentLog> getAllAdjustmentLogs();
    
    /**
     * 删除调整日志
     */
    boolean deleteAdjustmentLog(String id);
    
    /**
     * 根据排班分配ID删除调整日志
     */
    boolean deleteAdjustmentLogsByAssignmentId(String assignmentId);
    
    /**
     * 分页查询调整日志列表
     */
    PageResult<AdjustmentLog> getPagedAdjustmentLogList(Map<String, Object> params);
    
    /**
     * 记录排班调整日志
     */
    boolean logScheduleAdjustment(String assignmentId, String adjustmentType, 
                                 String oldValue, String newValue, String reason, Integer adjustedBy);
}